{% extends "base.html" %}
{% block page %}
    <div class="div">Kafka信息汇总</div>
    <table id="table_data" class="table table-bordered table-condensed" style="width: 95%;margin-left: 2.5%">
        <thead>
            <tr>
                {% for broke in brokes %}
                    <td style="background-color: #1c7430"><span style="color: whitesmoke;font-size: larger">{{ broke}}</span></td>
                {% endfor %}
            </tr>
        </thead>
    </table>
    <div class="grid">
        {% for topic in topics %}
            <div class="grid-item" style="height: 60px;">
                <div style="margin-top: 20px">
                    <a href="/kafka/{{ topic }}"><span style="color: whitesmoke;font-size: larger">{{ topic }}</span></a>
                </div>
            </div>
        {% endfor %}
    </div>
    <script>
        "use strict";
          (function(){
             function animate(item, x, y, index) {
               dynamics.animate(item, {
                 translateX: x,
                 translateY: y,
                 opacity: 1
                }, {
                  type: dynamics.spring,
                  duration: 800,
                  frequency: 120,
                  delay: 100 + index * 30
                });
              }
              minigrid('.grid', '.grid-item', 15, animate);
              window.addEventListener('resize', function(){
                minigrid('.grid', '.grid-item', 15, animate);
              });
            })();
    </script>
{% endblock %}